import request from '@/utils/request'

export const login = (username: string, password: string) => {
    return request({
        url: '/user/login',
        method: 'post',
        data: {
            username,
            password
        }
    })
}

export const register = (username: string, password: string, checkPassword: string,
                         nickname: string, longitude: number, latitude: number, tags: string[]) => {
    return request({
        url: '/user/register',
        method: 'post',
        data: {
            username,
            password,
            checkPassword,
            nickname,
            longitude,
            latitude,
            tags
        }
    })
}
